/*
 Navicat Premium Data Transfer

 Source Server         : aliyun
 Source Server Type    : Oracle
 Source Server Version : 110200
 Source Host           : 47.98.148.200:49161
 Source Schema         : EGOVA

 Target Server Type    : Oracle
 Target Server Version : 110200
 File Encoding         : 65001

 Date: 18/11/2022 01:30:10
*/


-- ----------------------------
-- Table structure for DEP
-- ----------------------------
DROP TABLE "EGOVA"."DEP";
CREATE TABLE "EGOVA"."DEP" (
  "UUID" NUMBER NOT NULL,
  "NAME" VARCHAR2(30 BYTE),
  "TELE" VARCHAR2(30 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."DEP"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."DEP"."NAME" IS '部门名称';
COMMENT ON COLUMN "EGOVA"."DEP"."TELE" IS '联系电话';
COMMENT ON TABLE "EGOVA"."DEP" IS '部门';

-- ----------------------------
-- Records of DEP
-- ----------------------------
INSERT INTO "EGOVA"."DEP" VALUES ('1', '管理员组', '000000');
INSERT INTO "EGOVA"."DEP" VALUES ('2', '总裁办', '111111');
INSERT INTO "EGOVA"."DEP" VALUES ('3', '采购部', '222222');
INSERT INTO "EGOVA"."DEP" VALUES ('4', '销售部', '333333');
INSERT INTO "EGOVA"."DEP" VALUES ('5', '公关部', '444444');
INSERT INTO "EGOVA"."DEP" VALUES ('6', '行政部', '555555');
INSERT INTO "EGOVA"."DEP" VALUES ('7', '人事部', '555555');
INSERT INTO "EGOVA"."DEP" VALUES ('8', '运输部', '444444');
INSERT INTO "EGOVA"."DEP" VALUES ('9', '党办', '555555');
INSERT INTO "EGOVA"."DEP" VALUES ('10', '工会', '555555');
INSERT INTO "EGOVA"."DEP" VALUES ('11', '仓储部', '555555');
INSERT INTO "EGOVA"."DEP" VALUES ('12', '客服部', '555555');
INSERT INTO "EGOVA"."DEP" VALUES ('13', '财务部', '555555');
INSERT INTO "EGOVA"."DEP" VALUES ('14', '运营部', '555555');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for EMP
-- ----------------------------
DROP TABLE "EGOVA"."EMP";
CREATE TABLE "EGOVA"."EMP" (
  "UUID" NUMBER NOT NULL,
  "USERNAME" VARCHAR2(15 BYTE),
  "PWD" VARCHAR2(32 BYTE),
  "NAME" VARCHAR2(28 BYTE),
  "GENDER" NUMBER,
  "EMAIL" VARCHAR2(255 BYTE),
  "TELE" VARCHAR2(30 BYTE),
  "ADDRESS" VARCHAR2(255 BYTE),
  "BIRTHDAY" DATE,
  "DEPUUID" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."EMP"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."EMP"."USERNAME" IS '登陆名';
COMMENT ON COLUMN "EGOVA"."EMP"."PWD" IS '登陆密码';
COMMENT ON COLUMN "EGOVA"."EMP"."NAME" IS '真实姓名';
COMMENT ON COLUMN "EGOVA"."EMP"."GENDER" IS '性别';
COMMENT ON COLUMN "EGOVA"."EMP"."EMAIL" IS '邮件地址';
COMMENT ON COLUMN "EGOVA"."EMP"."TELE" IS '联系电话';
COMMENT ON COLUMN "EGOVA"."EMP"."ADDRESS" IS '联系地址';
COMMENT ON COLUMN "EGOVA"."EMP"."BIRTHDAY" IS '出生年月日';
COMMENT ON COLUMN "EGOVA"."EMP"."DEPUUID" IS '部门编号';
COMMENT ON TABLE "EGOVA"."EMP" IS '员工';

-- ----------------------------
-- Records of EMP
-- ----------------------------
INSERT INTO "EGOVA"."EMP" VALUES ('1', 'admin', '123', '超级管理员', '1', 'admin@itcast.cn', '12345678', '建材城西路中腾商务大厦', TO_DATE('1949-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "EGOVA"."EMP" VALUES ('2', 'sunwukong', '123', '孙悟空', '1', 'swk@itcast.cn', '12345678', '花果山水帘洞11-2', TO_DATE('1949-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '2');
INSERT INTO "EGOVA"."EMP" VALUES ('3', 'tangseng', '123', '唐僧', '1', 'ts@itcast.cn', '12345678', '东土大唐小区90-14', TO_DATE('1949-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '2');
INSERT INTO "EGOVA"."EMP" VALUES ('4', 'zhubajie', '123', '猪八戒', '1', 'zbj@itcast.cn', '12345678', '高老庄生态园2-3', TO_DATE('1949-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '3');
INSERT INTO "EGOVA"."EMP" VALUES ('5', 'shaheshang', '123', '沙和尚', '1', 'shs@itcast.cn', '12345678', '流沙河风景区4-4', TO_DATE('1949-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '3');
INSERT INTO "EGOVA"."EMP" VALUES ('6', 'bailongma', '123', '白龙马', '1', 'blm@itcast.cn', '12345678', '西海家园4-9-1', TO_DATE('1949-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '3');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for EMP_ROLE
-- ----------------------------
DROP TABLE "EGOVA"."EMP_ROLE";
CREATE TABLE "EGOVA"."EMP_ROLE" (
  "UUID" NUMBER NOT NULL,
  "EMPUUID" NUMBER,
  "ROLEUUID" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."EMP_ROLE"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."EMP_ROLE"."EMPUUID" IS '员工编号';
COMMENT ON COLUMN "EGOVA"."EMP_ROLE"."ROLEUUID" IS '角色编号';
COMMENT ON TABLE "EGOVA"."EMP_ROLE" IS '员工角色';

-- ----------------------------
-- Records of EMP_ROLE
-- ----------------------------
INSERT INTO "EGOVA"."EMP_ROLE" VALUES ('1', '1', '1');
INSERT INTO "EGOVA"."EMP_ROLE" VALUES ('2', '2', '2');
INSERT INTO "EGOVA"."EMP_ROLE" VALUES ('3', '5', '3');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for GOODS
-- ----------------------------
DROP TABLE "EGOVA"."GOODS";
CREATE TABLE "EGOVA"."GOODS" (
  "UUID" NUMBER NOT NULL,
  "NAME" VARCHAR2(30 BYTE),
  "ORIGIN" VARCHAR2(30 BYTE),
  "PRODUCER" VARCHAR2(30 BYTE),
  "UNIT" VARCHAR2(30 BYTE),
  "INPRICE" NUMBER(8,2),
  "OUTPRICE" NUMBER(8,2),
  "GOODSTYPEUUID" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."GOODS"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."GOODS"."NAME" IS '名称';
COMMENT ON COLUMN "EGOVA"."GOODS"."ORIGIN" IS '产地';
COMMENT ON COLUMN "EGOVA"."GOODS"."PRODUCER" IS '厂家';
COMMENT ON COLUMN "EGOVA"."GOODS"."UNIT" IS '计量单位';
COMMENT ON COLUMN "EGOVA"."GOODS"."INPRICE" IS '进货价格';
COMMENT ON COLUMN "EGOVA"."GOODS"."OUTPRICE" IS '销售价格';
COMMENT ON COLUMN "EGOVA"."GOODS"."GOODSTYPEUUID" IS '商品类型';
COMMENT ON TABLE "EGOVA"."GOODS" IS '商品';

-- ----------------------------
-- Records of GOODS
-- ----------------------------
INSERT INTO "EGOVA"."GOODS" VALUES ('1', '水蜜桃', '北京', '北京水果之乡', '斤', '2.34', '4.23', '1');
INSERT INTO "EGOVA"."GOODS" VALUES ('2', '大鸭梨', '北京', '北京水果之乡', '斤', '1.11', '3.55', '1');
INSERT INTO "EGOVA"."GOODS" VALUES ('3', '猕猴桃', '北京', '北京水果之乡', '斤', '6.33', '9.02', '1');
INSERT INTO "EGOVA"."GOODS" VALUES ('4', '甜面酱', '北京', '七必居', '袋', '4.11', '6.33', '2');
INSERT INTO "EGOVA"."GOODS" VALUES ('5', '可比克', '北京', '北京山寨食品有限公司', '袋', '3.88', '6.33', '3');
INSERT INTO "EGOVA"."GOODS" VALUES ('6', '好吃点', '河北', '河北好吃点食品公司', '袋', '4.22', '5.21', '3');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for GOODSTYPE
-- ----------------------------
DROP TABLE "EGOVA"."GOODSTYPE";
CREATE TABLE "EGOVA"."GOODSTYPE" (
  "UUID" NUMBER NOT NULL,
  "NAME" VARCHAR2(30 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."GOODSTYPE"."UUID" IS '商品类型编号';
COMMENT ON COLUMN "EGOVA"."GOODSTYPE"."NAME" IS '商品类型名称';
COMMENT ON TABLE "EGOVA"."GOODSTYPE" IS '商品分类';

-- ----------------------------
-- Records of GOODSTYPE
-- ----------------------------
INSERT INTO "EGOVA"."GOODSTYPE" VALUES ('1', '水果');
INSERT INTO "EGOVA"."GOODSTYPE" VALUES ('2', '调味品');
INSERT INTO "EGOVA"."GOODSTYPE" VALUES ('3', '儿童食品');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for INVENTORY
-- ----------------------------
DROP TABLE "EGOVA"."INVENTORY";
CREATE TABLE "EGOVA"."INVENTORY" (
  "UUID" NUMBER NOT NULL,
  "GOODSUUID" NUMBER,
  "STOREUUID" NUMBER,
  "NUM" NUMBER,
  "TYPE" CHAR(1 BYTE),
  "CREATETIME" DATE,
  "CHECKTIME" DATE,
  "CREATER" NUMBER,
  "CHECKER" NUMBER,
  "STATE" CHAR(1 BYTE),
  "REMARK" VARCHAR2(200 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."INVENTORY"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."GOODSUUID" IS '商品';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."STOREUUID" IS '仓库';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."NUM" IS '数量';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."TYPE" IS '类型';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."CREATETIME" IS '登记日期';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."CHECKTIME" IS '审核日期';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."CREATER" IS '登记人';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."CHECKER" IS '审核人';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."STATE" IS '状态';
COMMENT ON COLUMN "EGOVA"."INVENTORY"."REMARK" IS '备注';
COMMENT ON TABLE "EGOVA"."INVENTORY" IS '盘盈盘亏';

-- ----------------------------
-- Records of INVENTORY
-- ----------------------------
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for MENU
-- ----------------------------
DROP TABLE "EGOVA"."MENU";
CREATE TABLE "EGOVA"."MENU" (
  "MENUID" VARCHAR2(20 BYTE) NOT NULL,
  "MENUNAME" VARCHAR2(30 BYTE),
  "ICON" VARCHAR2(20 BYTE),
  "URL" VARCHAR2(255 BYTE),
  "PID" VARCHAR2(20 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."MENU"."MENUID" IS '菜单ID';
COMMENT ON COLUMN "EGOVA"."MENU"."MENUNAME" IS '菜单名称';
COMMENT ON COLUMN "EGOVA"."MENU"."ICON" IS '图标';
COMMENT ON COLUMN "EGOVA"."MENU"."URL" IS 'URL';
COMMENT ON COLUMN "EGOVA"."MENU"."PID" IS '上级菜单ID';
COMMENT ON TABLE "EGOVA"."MENU" IS '菜单';

-- ----------------------------
-- Records of MENU
-- ----------------------------
INSERT INTO "EGOVA"."MENU" VALUES ('300', '采购管理', 'icon-sys', NULL, '0');
INSERT INTO "EGOVA"."MENU" VALUES ('301', '我的采购订单', 'icon-sys', 'orders.html?oper=myorders&type=1', '300');
INSERT INTO "EGOVA"."MENU" VALUES ('302', '采购订单查询', 'icon-sys', 'orders.html?oper=orders&type=1', '300');
INSERT INTO "EGOVA"."MENU" VALUES ('303', '采购订单审核', 'icon-sys', 'orders.html?oper=doCheck&type=1', '300');
INSERT INTO "EGOVA"."MENU" VALUES ('304', '采购订单确认', 'icon-sys', 'orders.html?oper=doStart&type=1', '300');
INSERT INTO "EGOVA"."MENU" VALUES ('305', '采购订单入库', 'icon-sys', 'orders.html?oper=doInStore&type=1', '300');
INSERT INTO "EGOVA"."MENU" VALUES ('400', '销售管理', 'icon-sys', NULL, '0');
INSERT INTO "EGOVA"."MENU" VALUES ('401', '我的销售订单', 'icon-sys', 'orders.html?oper=myorders&type=2', '400');
INSERT INTO "EGOVA"."MENU" VALUES ('703', '角色权限设置', 'icon-sys', 'roleMenuSet.html', '700');
INSERT INTO "EGOVA"."MENU" VALUES ('0', '系统菜单', 'icon-sys', NULL, NULL);
INSERT INTO "EGOVA"."MENU" VALUES ('100', '基础数据', 'icon-sys', NULL, '0');
INSERT INTO "EGOVA"."MENU" VALUES ('101', '商品类型', 'icon-sys', 'goodstype.html', '100');
INSERT INTO "EGOVA"."MENU" VALUES ('102', '商品', 'icon-sys', 'goods.html', '100');
INSERT INTO "EGOVA"."MENU" VALUES ('103', '仓库', 'icon-sys', 'store.html', '100');
INSERT INTO "EGOVA"."MENU" VALUES ('200', '人事管理', 'icon-sys', NULL, '0');
INSERT INTO "EGOVA"."MENU" VALUES ('201', '部门', 'icon-sys', 'dep.html', '200');
INSERT INTO "EGOVA"."MENU" VALUES ('202', '员工', 'icon-sys', 'emp.html', '200');
INSERT INTO "EGOVA"."MENU" VALUES ('402', '销售订单查询', 'icon-sys', 'orders.html?oper=orders&type=2', '400');
INSERT INTO "EGOVA"."MENU" VALUES ('403', '销售订单出库', 'icon-sys', 'orders.html?oper=doOutStore&type=2', '400');
INSERT INTO "EGOVA"."MENU" VALUES ('104', '供应商管理', 'icon-sys', 'supplier.html?type=1', '100');
INSERT INTO "EGOVA"."MENU" VALUES ('105', '客户管理', 'icon-sys', 'supplier.html?type=2', '100');
INSERT INTO "EGOVA"."MENU" VALUES ('500', '库存管理', 'icon-sys', NULL, '0');
INSERT INTO "EGOVA"."MENU" VALUES ('501', '库存查询', 'icon-sys', 'storedetail.html', '500');
INSERT INTO "EGOVA"."MENU" VALUES ('502', '库存操作记录', 'icon-sys', 'storeoper.html', '500');
INSERT INTO "EGOVA"."MENU" VALUES ('600', '统计分析', 'icon-sys', NULL, '0');
INSERT INTO "EGOVA"."MENU" VALUES ('601', '销售统计报表', 'icon-sys', 'report_order.html', '600');
INSERT INTO "EGOVA"."MENU" VALUES ('602', '销售趋势分析', 'icon-sys', 'report_trend.html', '600');
INSERT INTO "EGOVA"."MENU" VALUES ('700', '权限管理', 'icon-sys', NULL, '0');
INSERT INTO "EGOVA"."MENU" VALUES ('701', '角色设置', 'icon-sys', 'role.html', '700');
INSERT INTO "EGOVA"."MENU" VALUES ('702', '用户角色设置', 'icon-sys', 'empRoleSet.html', '700');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for ORDERDETAIL
-- ----------------------------
DROP TABLE "EGOVA"."ORDERDETAIL";
CREATE TABLE "EGOVA"."ORDERDETAIL" (
  "UUID" NUMBER NOT NULL,
  "GOODSUUID" NUMBER,
  "GOODSNAME" VARCHAR2(50 BYTE),
  "PRICE" NUMBER(10,2),
  "NUM" NUMBER,
  "MONEY" NUMBER(10,2),
  "ENDTIME" DATE,
  "ENDER" NUMBER,
  "STOREUUID" NUMBER,
  "STATE" CHAR(1 BYTE),
  "ORDERSUUID" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."GOODSUUID" IS '商品编号';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."GOODSNAME" IS '商品名称';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."PRICE" IS '价格';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."NUM" IS '数量';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."MONEY" IS '金额';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."ENDTIME" IS '结束日期';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."ENDER" IS '库管员';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."STOREUUID" IS '仓库编号';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."STATE" IS '采购：0=未入库，1=已入库  销售：0=未出库，1=已出库';
COMMENT ON COLUMN "EGOVA"."ORDERDETAIL"."ORDERSUUID" IS '订单编号';
COMMENT ON TABLE "EGOVA"."ORDERDETAIL" IS '订单明细';

-- ----------------------------
-- Records of ORDERDETAIL
-- ----------------------------
INSERT INTO "EGOVA"."ORDERDETAIL" VALUES ('4', '6', '好吃点', '4.22', '100', '422', NULL, NULL, NULL, '0', '4');
INSERT INTO "EGOVA"."ORDERDETAIL" VALUES ('1', '1', '水蜜桃', '2.34', '100', '234', NULL, NULL, NULL, '0', '1');
INSERT INTO "EGOVA"."ORDERDETAIL" VALUES ('2', '2', '大鸭梨', '1.11', '100', '111', NULL, NULL, NULL, '0', '2');
INSERT INTO "EGOVA"."ORDERDETAIL" VALUES ('3', '3', '猕猴桃', '6.33', '100', '633', TO_DATE('2022-11-18 00:57:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', '1', '1', '3');
INSERT INTO "EGOVA"."ORDERDETAIL" VALUES ('5', '1', '水蜜桃', '5.5', '50', '275', NULL, NULL, NULL, '0', '5');
INSERT INTO "EGOVA"."ORDERDETAIL" VALUES ('6', '2', '大鸭梨', '4.55', '50', '227.5', NULL, NULL, NULL, '0', '6');
INSERT INTO "EGOVA"."ORDERDETAIL" VALUES ('7', '3', '猕猴桃', '13.6', '50', '680', NULL, NULL, NULL, '0', '7');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for ORDERS
-- ----------------------------
DROP TABLE "EGOVA"."ORDERS";
CREATE TABLE "EGOVA"."ORDERS" (
  "UUID" NUMBER NOT NULL,
  "CREATETIME" DATE,
  "CHECKTIME" DATE,
  "STARTTIME" DATE,
  "ENDTIME" DATE,
  "TYPE" CHAR(1 BYTE),
  "CREATER" NUMBER,
  "CHECKER" NUMBER,
  "STARTER" NUMBER,
  "ENDER" NUMBER,
  "SUPPLIERUUID" NUMBER,
  "TOTALMONEY" NUMBER(10,2),
  "STATE" CHAR(1 BYTE),
  "WAYBILLSN" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."ORDERS"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."ORDERS"."CREATETIME" IS '生成日期';
COMMENT ON COLUMN "EGOVA"."ORDERS"."CHECKTIME" IS '审核日期';
COMMENT ON COLUMN "EGOVA"."ORDERS"."STARTTIME" IS '确认日期';
COMMENT ON COLUMN "EGOVA"."ORDERS"."ENDTIME" IS '入库或出库日期';
COMMENT ON COLUMN "EGOVA"."ORDERS"."TYPE" IS '1:采购 2:销售';
COMMENT ON COLUMN "EGOVA"."ORDERS"."CREATER" IS '下单员';
COMMENT ON COLUMN "EGOVA"."ORDERS"."CHECKER" IS '审核员';
COMMENT ON COLUMN "EGOVA"."ORDERS"."STARTER" IS '采购员';
COMMENT ON COLUMN "EGOVA"."ORDERS"."ENDER" IS '库管员';
COMMENT ON COLUMN "EGOVA"."ORDERS"."SUPPLIERUUID" IS '供应商或客户';
COMMENT ON COLUMN "EGOVA"."ORDERS"."TOTALMONEY" IS '合计金额';
COMMENT ON COLUMN "EGOVA"."ORDERS"."STATE" IS '采购: 0:未审核 1:已审核, 2:已确认, 3:已入库；销售：0:未出库 1:已出库';
COMMENT ON COLUMN "EGOVA"."ORDERS"."WAYBILLSN" IS '运单号';
COMMENT ON TABLE "EGOVA"."ORDERS" IS '订单';

-- ----------------------------
-- Records of ORDERS
-- ----------------------------
INSERT INTO "EGOVA"."ORDERS" VALUES ('4', TO_DATE('2022-11-18 00:55:00', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, NULL, '1', '1', NULL, NULL, NULL, '1', '422', '0', NULL);
INSERT INTO "EGOVA"."ORDERS" VALUES ('1', TO_DATE('2022-11-18 00:54:14', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-11-18 00:56:10', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, '1', '1', '1', NULL, NULL, '1', '234', '1', NULL);
INSERT INTO "EGOVA"."ORDERS" VALUES ('2', TO_DATE('2022-11-18 00:54:33', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-11-18 00:55:28', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-11-18 00:56:35', 'SYYYY-MM-DD HH24:MI:SS'), NULL, '1', '1', '1', '1', NULL, '1', '111', '2', NULL);
INSERT INTO "EGOVA"."ORDERS" VALUES ('3', TO_DATE('2022-11-18 00:54:46', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-11-18 00:55:21', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-11-18 00:55:38', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-11-18 00:57:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', '1', '1', '1', '1', '1', '633', '3', NULL);
INSERT INTO "EGOVA"."ORDERS" VALUES ('5', TO_DATE('2022-11-18 00:57:55', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, NULL, '2', '1', NULL, NULL, NULL, '2', '275', '0', NULL);
INSERT INTO "EGOVA"."ORDERS" VALUES ('6', TO_DATE('2022-11-18 00:58:15', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, NULL, '2', '1', NULL, NULL, NULL, '2', '227.5', '0', NULL);
INSERT INTO "EGOVA"."ORDERS" VALUES ('7', TO_DATE('2022-11-18 00:59:55', 'SYYYY-MM-DD HH24:MI:SS'), NULL, NULL, NULL, '2', '1', NULL, NULL, NULL, '2', '680', '0', NULL);
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for RETURNORDERDETAIL
-- ----------------------------
DROP TABLE "EGOVA"."RETURNORDERDETAIL";
CREATE TABLE "EGOVA"."RETURNORDERDETAIL" (
  "UUID" NUMBER NOT NULL,
  "GOODSUUID" NUMBER,
  "GOODSNAME" VARCHAR2(50 BYTE),
  "PRICE" NUMBER(10,2),
  "NUM" NUMBER,
  "MONEY" NUMBER(10,2),
  "ENDTIME" DATE,
  "ENDER" NUMBER,
  "STOREUUID" NUMBER,
  "STATE" CHAR(1 BYTE),
  "ORDERSUUID" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."GOODSUUID" IS '商品编号';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."GOODSNAME" IS '商品名称';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."PRICE" IS '价格';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."NUM" IS '数量';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."MONEY" IS '金额';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."ENDTIME" IS '结束日期';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."ENDER" IS '库管员';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."STOREUUID" IS '仓库编号';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."STATE" IS '状态';
COMMENT ON COLUMN "EGOVA"."RETURNORDERDETAIL"."ORDERSUUID" IS '退货订单编号';
COMMENT ON TABLE "EGOVA"."RETURNORDERDETAIL" IS '退货订单明细';

-- ----------------------------
-- Records of RETURNORDERDETAIL
-- ----------------------------
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for RETURNORDERS
-- ----------------------------
DROP TABLE "EGOVA"."RETURNORDERS";
CREATE TABLE "EGOVA"."RETURNORDERS" (
  "UUID" NUMBER NOT NULL,
  "CREATETIME" DATE,
  "CHECKTIME" DATE,
  "ENDTIME" DATE,
  "TYPE" CHAR(1 BYTE),
  "CREATER" NUMBER,
  "CHECKER" NUMBER,
  "ENDER" NUMBER,
  "SUPPLIERUUID" NUMBER,
  "TOTALMONEY" NUMBER(10,2),
  "STATE" CHAR(1 BYTE),
  "WAYBILLSN" NUMBER,
  "ORDERSUUID" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."CREATETIME" IS '生成日期';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."CHECKTIME" IS '检查日期';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."ENDTIME" IS '结束日期';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."TYPE" IS '订单类型';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."CREATER" IS '下单员';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."CHECKER" IS '审核员工编号';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."ENDER" IS '库管员';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."SUPPLIERUUID" IS '供应商及客户编号';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."TOTALMONEY" IS '合计金额';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."STATE" IS '订单状态';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."WAYBILLSN" IS '运单号';
COMMENT ON COLUMN "EGOVA"."RETURNORDERS"."ORDERSUUID" IS '原订单编号';
COMMENT ON TABLE "EGOVA"."RETURNORDERS" IS '退货订单';

-- ----------------------------
-- Records of RETURNORDERS
-- ----------------------------
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for ROLE
-- ----------------------------
DROP TABLE "EGOVA"."ROLE";
CREATE TABLE "EGOVA"."ROLE" (
  "UUID" NUMBER NOT NULL,
  "NAME" VARCHAR2(30 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."ROLE"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."ROLE"."NAME" IS '名称';
COMMENT ON TABLE "EGOVA"."ROLE" IS '角色';

-- ----------------------------
-- Records of ROLE
-- ----------------------------
INSERT INTO "EGOVA"."ROLE" VALUES ('2', '销售总监');
INSERT INTO "EGOVA"."ROLE" VALUES ('3', '仓库管理员');
INSERT INTO "EGOVA"."ROLE" VALUES ('1', '超级管理员');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for ROLE_MENU
-- ----------------------------
DROP TABLE "EGOVA"."ROLE_MENU";
CREATE TABLE "EGOVA"."ROLE_MENU" (
  "UUID" NUMBER NOT NULL,
  "ROLEUUID" NUMBER,
  "MENUUUID" VARCHAR2(10 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."ROLE_MENU"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."ROLE_MENU"."ROLEUUID" IS '角色编号';
COMMENT ON COLUMN "EGOVA"."ROLE_MENU"."MENUUUID" IS '菜单编号';
COMMENT ON TABLE "EGOVA"."ROLE_MENU" IS '角色菜单';

-- ----------------------------
-- Records of ROLE_MENU
-- ----------------------------
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('30', '1', '703');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('31', '2', '100');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('32', '2', '101');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('33', '2', '102');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('34', '2', '103');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('35', '2', '104');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('36', '2', '105');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('37', '2', '400');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('38', '2', '401');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('39', '2', '402');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('40', '2', '403');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('41', '2', '600');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('42', '2', '601');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('43', '2', '602');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('44', '3', '100');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('45', '3', '101');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('46', '3', '102');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('47', '3', '103');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('48', '3', '104');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('49', '3', '105');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('50', '3', '500');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('51', '3', '501');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('52', '3', '502');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('1', '1', '0');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('2', '1', '100');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('3', '1', '101');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('4', '1', '102');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('5', '1', '103');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('6', '1', '200');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('7', '1', '201');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('8', '1', '202');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('9', '1', '300');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('10', '1', '301');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('11', '1', '302');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('12', '1', '303');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('13', '1', '304');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('14', '1', '305');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('15', '1', '400');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('16', '1', '401');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('17', '1', '402');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('18', '1', '403');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('19', '1', '104');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('20', '1', '105');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('21', '1', '500');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('22', '1', '501');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('23', '1', '502');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('24', '1', '600');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('25', '1', '601');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('26', '1', '602');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('27', '1', '700');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('28', '1', '701');
INSERT INTO "EGOVA"."ROLE_MENU" VALUES ('29', '1', '702');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for STORE
-- ----------------------------
DROP TABLE "EGOVA"."STORE";
CREATE TABLE "EGOVA"."STORE" (
  "UUID" NUMBER NOT NULL,
  "NAME" VARCHAR2(30 BYTE),
  "EMPUUID" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."STORE"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."STORE"."NAME" IS '名称';
COMMENT ON COLUMN "EGOVA"."STORE"."EMPUUID" IS '员工编号';
COMMENT ON TABLE "EGOVA"."STORE" IS '仓库';

-- ----------------------------
-- Records of STORE
-- ----------------------------
INSERT INTO "EGOVA"."STORE" VALUES ('1', '华中仓库', '1');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for STOREDETAIL
-- ----------------------------
DROP TABLE "EGOVA"."STOREDETAIL";
CREATE TABLE "EGOVA"."STOREDETAIL" (
  "UUID" NUMBER NOT NULL,
  "STOREUUID" NUMBER,
  "GOODSUUID" NUMBER,
  "NUM" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."STOREDETAIL"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."STOREDETAIL"."STOREUUID" IS '仓库编号';
COMMENT ON COLUMN "EGOVA"."STOREDETAIL"."GOODSUUID" IS '商品编号';
COMMENT ON COLUMN "EGOVA"."STOREDETAIL"."NUM" IS '数量';
COMMENT ON TABLE "EGOVA"."STOREDETAIL" IS '仓库库存';

-- ----------------------------
-- Records of STOREDETAIL
-- ----------------------------
INSERT INTO "EGOVA"."STOREDETAIL" VALUES ('1', '1', '3', '100');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for STOREOPER
-- ----------------------------
DROP TABLE "EGOVA"."STOREOPER";
CREATE TABLE "EGOVA"."STOREOPER" (
  "UUID" NUMBER NOT NULL,
  "EMPUUID" NUMBER,
  "OPERTIME" DATE,
  "STOREUUID" NUMBER,
  "GOODSUUID" NUMBER,
  "NUM" NUMBER,
  "TYPE" CHAR(1 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."STOREOPER"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."STOREOPER"."EMPUUID" IS '操作员工编号';
COMMENT ON COLUMN "EGOVA"."STOREOPER"."OPERTIME" IS '操作日期';
COMMENT ON COLUMN "EGOVA"."STOREOPER"."STOREUUID" IS '仓库编号';
COMMENT ON COLUMN "EGOVA"."STOREOPER"."GOODSUUID" IS '商品编号';
COMMENT ON COLUMN "EGOVA"."STOREOPER"."NUM" IS '数量';
COMMENT ON COLUMN "EGOVA"."STOREOPER"."TYPE" IS '1：入库 2：出库';
COMMENT ON TABLE "EGOVA"."STOREOPER" IS '仓库操作记录';

-- ----------------------------
-- Records of STOREOPER
-- ----------------------------
INSERT INTO "EGOVA"."STOREOPER" VALUES ('1', '1', TO_DATE('2022-11-18 00:57:26', 'SYYYY-MM-DD HH24:MI:SS'), '1', '3', '100', '1');
COMMIT;
COMMIT;

-- ----------------------------
-- Table structure for SUPPLIER
-- ----------------------------
DROP TABLE "EGOVA"."SUPPLIER";
CREATE TABLE "EGOVA"."SUPPLIER" (
  "UUID" NUMBER NOT NULL,
  "NAME" VARCHAR2(30 BYTE),
  "ADDRESS" VARCHAR2(100 BYTE),
  "CONTACT" VARCHAR2(30 BYTE),
  "TELE" VARCHAR2(30 BYTE),
  "EMAIL" VARCHAR2(100 BYTE),
  "TYPE" CHAR(1 BYTE)
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "EGOVA"."SUPPLIER"."UUID" IS '编号';
COMMENT ON COLUMN "EGOVA"."SUPPLIER"."NAME" IS '名称';
COMMENT ON COLUMN "EGOVA"."SUPPLIER"."ADDRESS" IS '联系地址';
COMMENT ON COLUMN "EGOVA"."SUPPLIER"."CONTACT" IS '联系人';
COMMENT ON COLUMN "EGOVA"."SUPPLIER"."TELE" IS '联系电话';
COMMENT ON COLUMN "EGOVA"."SUPPLIER"."EMAIL" IS '邮件地址';
COMMENT ON COLUMN "EGOVA"."SUPPLIER"."TYPE" IS '1：供应商 2：客户';
COMMENT ON TABLE "EGOVA"."SUPPLIER" IS '供应商';

-- ----------------------------
-- Records of SUPPLIER
-- ----------------------------
INSERT INTO "EGOVA"."SUPPLIER" VALUES ('1', '阿里巴巴', '杭州', '马云', '13399898898', 'mayun@126.com', '1');
INSERT INTO "EGOVA"."SUPPLIER" VALUES ('2', '中百仓储', '武汉', '雷军', '15533434456', '光谷大道', '2');
COMMIT;
COMMIT;

-- ----------------------------
-- Sequence structure for DEP_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."DEP_SEQ";
CREATE SEQUENCE "EGOVA"."DEP_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for EMP_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."EMP_SEQ";
CREATE SEQUENCE "EGOVA"."EMP_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for GOODSTYPE_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."GOODSTYPE_SEQ";
CREATE SEQUENCE "EGOVA"."GOODSTYPE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for GOODS_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."GOODS_SEQ";
CREATE SEQUENCE "EGOVA"."GOODS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for INVENTORY_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."INVENTORY_SEQ";
CREATE SEQUENCE "EGOVA"."INVENTORY_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for ORDERDETAIL_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."ORDERDETAIL_SEQ";
CREATE SEQUENCE "EGOVA"."ORDERDETAIL_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for ORDERS_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."ORDERS_SEQ";
CREATE SEQUENCE "EGOVA"."ORDERS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for RETURNORDERDETAIL_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."RETURNORDERDETAIL_SEQ";
CREATE SEQUENCE "EGOVA"."RETURNORDERDETAIL_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for RETURNORDERS_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."RETURNORDERS_SEQ";
CREATE SEQUENCE "EGOVA"."RETURNORDERS_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for ROLE_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."ROLE_SEQ";
CREATE SEQUENCE "EGOVA"."ROLE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_EMP_ROLE
-- ----------------------------
DROP SEQUENCE "EGOVA"."SEQ_EMP_ROLE";
CREATE SEQUENCE "EGOVA"."SEQ_EMP_ROLE" MINVALUE 1 MAXVALUE 99999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SEQ_ROLE_MENU
-- ----------------------------
DROP SEQUENCE "EGOVA"."SEQ_ROLE_MENU";
CREATE SEQUENCE "EGOVA"."SEQ_ROLE_MENU" MINVALUE 1 MAXVALUE 99999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for STOREDETAIL_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."STOREDETAIL_SEQ";
CREATE SEQUENCE "EGOVA"."STOREDETAIL_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for STOREOPER_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."STOREOPER_SEQ";
CREATE SEQUENCE "EGOVA"."STOREOPER_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for STORE_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."STORE_SEQ";
CREATE SEQUENCE "EGOVA"."STORE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Sequence structure for SUPPLIER_SEQ
-- ----------------------------
DROP SEQUENCE "EGOVA"."SUPPLIER_SEQ";
CREATE SEQUENCE "EGOVA"."SUPPLIER_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 NOCACHE;

-- ----------------------------
-- Primary Key structure for table DEP
-- ----------------------------
ALTER TABLE "EGOVA"."DEP" ADD CONSTRAINT "PK_DEP" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table DEP
-- ----------------------------
ALTER TABLE "EGOVA"."DEP" ADD CONSTRAINT "SYS_C006987" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table EMP
-- ----------------------------
ALTER TABLE "EGOVA"."EMP" ADD CONSTRAINT "PK_EMP" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table EMP
-- ----------------------------
ALTER TABLE "EGOVA"."EMP" ADD CONSTRAINT "SYS_C006989" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table EMP_ROLE
-- ----------------------------
ALTER TABLE "EGOVA"."EMP_ROLE" ADD CONSTRAINT "SYS_C005922" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table EMP_ROLE
-- ----------------------------
ALTER TABLE "EGOVA"."EMP_ROLE" ADD CONSTRAINT "SYS_C006991" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table EMP_ROLE
-- ----------------------------
CREATE TRIGGER "EGOVA"."TRG_EMP_ROLE" BEFORE INSERT ON "EGOVA"."EMP_ROLE" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW 
BEGIN
SELECT seq_emp_role.nextval INTO :new.uuid FROM dual;   --new 表示新行，uuid， emp_role 的主键字段
END;
/

-- ----------------------------
-- Primary Key structure for table GOODS
-- ----------------------------
ALTER TABLE "EGOVA"."GOODS" ADD CONSTRAINT "PK_GOODS" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table GOODS
-- ----------------------------
ALTER TABLE "EGOVA"."GOODS" ADD CONSTRAINT "SYS_C006993" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table GOODSTYPE
-- ----------------------------
ALTER TABLE "EGOVA"."GOODSTYPE" ADD CONSTRAINT "PK_GOODSTYPE" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table GOODSTYPE
-- ----------------------------
ALTER TABLE "EGOVA"."GOODSTYPE" ADD CONSTRAINT "SYS_C006995" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table INVENTORY
-- ----------------------------
ALTER TABLE "EGOVA"."INVENTORY" ADD CONSTRAINT "PK_INVENTORY" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table INVENTORY
-- ----------------------------
ALTER TABLE "EGOVA"."INVENTORY" ADD CONSTRAINT "SYS_C006997" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table MENU
-- ----------------------------
ALTER TABLE "EGOVA"."MENU" ADD CONSTRAINT "PK_MENU" PRIMARY KEY ("MENUID");

-- ----------------------------
-- Checks structure for table MENU
-- ----------------------------
ALTER TABLE "EGOVA"."MENU" ADD CONSTRAINT "SYS_C006999" CHECK ("MENUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table ORDERDETAIL
-- ----------------------------
ALTER TABLE "EGOVA"."ORDERDETAIL" ADD CONSTRAINT "PK_ORDERDETAIL" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table ORDERDETAIL
-- ----------------------------
ALTER TABLE "EGOVA"."ORDERDETAIL" ADD CONSTRAINT "SYS_C007001" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table ORDERS
-- ----------------------------
ALTER TABLE "EGOVA"."ORDERS" ADD CONSTRAINT "PK_ORDERS" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table ORDERS
-- ----------------------------
ALTER TABLE "EGOVA"."ORDERS" ADD CONSTRAINT "SYS_C007003" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table RETURNORDERDETAIL
-- ----------------------------
ALTER TABLE "EGOVA"."RETURNORDERDETAIL" ADD CONSTRAINT "PK_RETURNORDERDETAIL" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table RETURNORDERDETAIL
-- ----------------------------
ALTER TABLE "EGOVA"."RETURNORDERDETAIL" ADD CONSTRAINT "SYS_C007005" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table RETURNORDERS
-- ----------------------------
ALTER TABLE "EGOVA"."RETURNORDERS" ADD CONSTRAINT "PK_RETURNORDERS" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table RETURNORDERS
-- ----------------------------
ALTER TABLE "EGOVA"."RETURNORDERS" ADD CONSTRAINT "SYS_C007007" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table ROLE
-- ----------------------------
ALTER TABLE "EGOVA"."ROLE" ADD CONSTRAINT "PK_ROLE" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table ROLE
-- ----------------------------
ALTER TABLE "EGOVA"."ROLE" ADD CONSTRAINT "SYS_C007009" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table ROLE_MENU
-- ----------------------------
ALTER TABLE "EGOVA"."ROLE_MENU" ADD CONSTRAINT "SYS_C005942" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table ROLE_MENU
-- ----------------------------
ALTER TABLE "EGOVA"."ROLE_MENU" ADD CONSTRAINT "SYS_C007011" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Triggers structure for table ROLE_MENU
-- ----------------------------
CREATE TRIGGER "EGOVA"."TRG_ROLE_MENU" BEFORE INSERT ON "EGOVA"."ROLE_MENU" REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW 
BEGIN
SELECT seq_role_menu.nextval INTO :new.uuid FROM dual;   --new 表示新行，uuid， role_menu 的主键字段
END;
/

-- ----------------------------
-- Primary Key structure for table STORE
-- ----------------------------
ALTER TABLE "EGOVA"."STORE" ADD CONSTRAINT "PK_STORE" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table STORE
-- ----------------------------
ALTER TABLE "EGOVA"."STORE" ADD CONSTRAINT "SYS_C007013" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table STOREDETAIL
-- ----------------------------
ALTER TABLE "EGOVA"."STOREDETAIL" ADD CONSTRAINT "PK_STOREDETAIL" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table STOREDETAIL
-- ----------------------------
ALTER TABLE "EGOVA"."STOREDETAIL" ADD CONSTRAINT "SYS_C007015" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table STOREOPER
-- ----------------------------
ALTER TABLE "EGOVA"."STOREOPER" ADD CONSTRAINT "PK_STOREOPER" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table STOREOPER
-- ----------------------------
ALTER TABLE "EGOVA"."STOREOPER" ADD CONSTRAINT "SYS_C007017" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table SUPPLIER
-- ----------------------------
ALTER TABLE "EGOVA"."SUPPLIER" ADD CONSTRAINT "PK_SUPPLIER" PRIMARY KEY ("UUID");

-- ----------------------------
-- Checks structure for table SUPPLIER
-- ----------------------------
ALTER TABLE "EGOVA"."SUPPLIER" ADD CONSTRAINT "SYS_C007019" CHECK ("UUID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
